import React,{Component} from 'react'
import {render} from 'react-dom'
import PureRenderMixin from 'react-addons-pure-render-mixin'
import axios from 'axios'
class home extends Component {
	  constructor(props, context){
	    super(props, context);
	    this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);

	  }
	  render(){
	  	 return (
				<div className="span6 file animated" id='RevealImg'>
					<input type='submit' value='提交' onClick={this.gets.bind(this)}/>
				</div>
			)
	   }
	   componentDidMount(){
			axios.get('/api/users?ID=12345')
			  .then(function(response){
			    console.log(response);
			  })
			  .catch(function(err){
			    console.log(err);
			  });
	   }
	   gets(){
			axios.post('/api/users/bar?ID=12345',{
				fistname:'y',
				lastname:'by'
			})
			  .then(function(response){
			    console.log(response);
			  })
			  .catch(function(err){
			    console.log(err);
			  });	   	
	   }
} 
export default home